import { getCompanyId, getScmUserInfo } from "@core/shared";

/**
 *
 * @param type 1 采购方 , 2 销售方
 * @returns
 */
export const getParticipantsFormat =
  (type = 1) =>
  (u) => ({
    // ...u,
    userName: u.userName,
    personalSign: u.personalSign,
    loginName: u.loginName,
    companySign: u.companySign,
    // companyRoleName: type === 1 ? '采购方' : '供货方',
    companyRole: type === 1 ? 8 : 9,
    companyName: getScmUserInfo().companyName,
    companyId: getCompanyId(),

    userId: u.userId,
    companyDid: u.companyDid,
    userDid: u.userDid,
  });
